GtkWidget: Handle style updates before realize
authorAlexander Larsson <alexl@redhat.com>
Wed, 20 Mar 2013 12:56:16 +0000 (13:56 +0100)
committerAlexander Larsson <alexl@redhat.com>
Wed, 20 Mar 2013 12:56:16 +0000 (13:56 +0100)
If the style changes before we're realized we will delay the
style-updated signal until realize. However, we then lose
the changes bitmap. This means that gtk_widget_real_style_updated()
must treat a NULL change as "everything changed" and queue a resize.

gtk/gtkwidget.c

index 5716a04ae04f83a0c0a81b55371357c342e2db7a..44755b68b1ffd333c19aec85e09ef8cd6e64210c 100644 (file)
@@ -7145,7 +7145,7 @@ gtk_widget_real_style_updated (GtkWidget *widget)
 
       if (widget->priv->anchored)
         {
-          if (changes && _gtk_css_style_property_changes_affect_size (changes))
+          if (changes == NULL || _gtk_css_style_property_changes_affect_size (changes))
             gtk_widget_queue_resize (widget);
           else
             gtk_widget_queue_draw (widget);